package com.gitee.huanminabc.fastboot.web.servlet;

public enum RequestMethodEnum {
    GET, POST, PUT, DELETE;

    public static RequestMethodEnum getEnum(String method) {
        for (RequestMethodEnum RequestMethodEnum : RequestMethodEnum.values()) {
            if (RequestMethodEnum.name().equalsIgnoreCase(method)) {
                return RequestMethodEnum;
            }
        }
        return null;
    }

    //比较
    public boolean equalsIgnoreCase(String method) {
        return this.name().equalsIgnoreCase(method);
    }
}